package org.casper.outofmemory;

public class TestThread {

	/**
	 * 演示异常java.lang.OutOfMemoryError: unable to create new native thread
	 */
	public static void main(String[] args) {
		while (true) {
			new Thread(new Runnable() {
				@Override
				public void run() {
					try {
						Thread.sleep(1_000_000_00);
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
			}).start();
		}

	}
}
